<!DOCTYPE html>
<html class="x-admin-sm">

<head>
    <meta charset="UTF-8">
    <title>团体认证</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
        content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="../css/font.css">
    <link rel="stylesheet" href="../css/iconfont.css">
    <link rel="stylesheet" href="../lib/layui/css/layui.css" media="all">

    <link rel="stylesheet" href="../css/xadmin.css">
    <script src="../js/jquery.min.js"></script>
    <script src="../lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="../js/xadmin.js"></script>
    <script src="../js/base.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style>
        tr td,
        tr th {
            text-align: center !important;
            border: none !important;
        }

        .layui-laydate-content tr td {
            border-bottom: none !important;
            border-top: none !important;
        }

        tr td {
            border-bottom: 1px solid #eee !important;
            border-top: 1px solid #eee !important;
        }
    </style>
</head>

<body>
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card" style="display: flex;justify-content: space-between;">
                    <div class="layui-card-body ">
                        <blockquote class="layui-elem-quote" style="border:0;font-size: 18px;color: #000;">团体认证
                        </blockquote>
                    </div>
                    <!--<div class="layui-card-body " style="display: flex;">
                    <blockquote style="cursor: pointer" class="layui-elem-quote" onclick="xadmin.open('新增视频','add_video.html',600,600)"><i class="layui-icon">&#xe654;</i>新增视频</blockquote>
                </div>-->
                </div>
            </div>
            <div class="layui-col-md12">
                <div class="layui-card">
                    <!-- <div class="layui-card-header">数据统计</div> -->
                    <div class="layui-fluid">
                        <div class="layui-row layui-col-space15">
                            <div class="layui-col-md12">
                                <div class="layui-card-body " style="display: flex;justify-content:space-between">
                                    <form class="layui-form" action="">
                                        <div class="layui-inline layui-show-xs-block" style="padding: 10px 0;">
                                            <input id="name" name="name" class="layui-input" placeholder="名称">
                                        </div>
                                        <div class="layui-inline layui-show-xs-block" style="padding: 10px 0;">
                                            <select id="interest" name="interest" lay-filter="aihao">
                                                <option value="">请选择认证状态</option>
                                                <option value="0">未认证</option>
                                                <option value="1">认证通过</option>
                                                <option value="2">认证失败</option>
                                            </select>
                                        </div>
                                        <div class="layui-inline layui-show-xs-block" style="padding: 10px 0;">
                                            <input id="area" name="area" class="layui-input" placeholder="地区-市">
                                        </div>
                                        <div class="layui-inline layui-show-xs-block" style="padding: 10px 0;">
                                            <input id="city" name="city" class="layui-input" placeholder="地区-区">
                                        </div>
                                        <div class="layui-inline layui-show-xs-block" style="padding: 10px 0;">
                                            <input type="text" class="layui-input" id="test6" placeholder="注册日期范围">
                                        </div>
                                        <div class="layui-inline layui-show-xs-block" style="padding: 10px 0;">
                                            <input id="zhucezijin" name="zhucezijin" class="layui-input"
                                                placeholder="注册资金">
                                        </div>
                                        <div class="layui-inline layui-show-xs-block" style="padding: 10px 0;">
                                            <button class="layui-btn search search-btn" data-type="reload"
                                                lay-filter="add">搜索
                                            </button>
                                        </div>
                                        <div class="layui-inline layui-show-xs-block" style="padding: 10px 0;">
                                            <button class="layui-btn search search-btn" data-type="renzhengPL"
                                                lay-filter="renzhengPL">批量认证
                                            </button>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-card-body layui-table-body layui-table-main">
                <div class="layui-inline layui-show-xs-block">
                    <button class="layui-btn search search1">学校
                    </button>
                </div>
                <div class="layui-inline layui-show-xs-block">
                    <button class="layui-btn search search2">公司
                    </button>
                </div>
                <div class="layui-inline layui-show-xs-block">
                    <button class="layui-btn search search3">工商局俱乐部
                    </button>
                </div>
                <div class="layui-inline layui-show-xs-block">
                    <button class="layui-btn search search4">民政局俱乐部
                    </button>
                </div>
                <div class="layui-inline layui-show-xs-block">
                    <button class="layui-btn search search5">各地足协
                    </button>
                </div>
                <!-- 表格部分开始 -->
                <div class="show1">
                    <table id="user_table" lay-filter="test" lay-data="{id: 'testReload'}"></table>
                    <script type="text/html" id="barDemo">
                        {{#  if(d.groupAuth == "0"){ }}
                        <a lay-event="edit" class="btn_a layui-btn layui-btn-xs">认证</a>
                        {{#  } else { }}
                        <a lay-event="noClick"
                            class="btn_a layui-btn layui-btn-primary layui-btn-xs layui-btn-disabled">认证</a>
                        {{#  }}}
                        <a lay-event="watchDetail" class="btn_a layui-btn layui-btn-primary layui-btn-xs">查看日志</a>
                    </script>
                </div>
                <div class="show2" style="display: none;">
                    <table id="user_table1" lay-filter="test1" lay-data="{id: 'testReload1'}"></table>
                    <script type="text/html" id="barDemoa">
                        {{#  if(d.groupAuth == "0"){ }}
                        <a lay-event="edit" class="btn_a layui-btn layui-btn-xs">认证</a>
                        {{#  } else { }}
                        <a lay-event="noClick"
                            class="btn_a layui-btn layui-btn-primary layui-btn-xs layui-btn-disabled">认证</a>
                        {{#  }}}
                        <a lay-event="watchDetail" class="btn_a layui-btn layui-btn-primary layui-btn-xs">查看日志</a>
                    </script>
                </div>
                <div class="show3" style="display: none;">
                    <table id="user_table2" lay-filter="test2" lay-data="{id: 'testReload2'}"></table>
                    <script type="text/html" id="barDemob">
                        {{#  if(d.groupAuth == "0"){ }}
                        <a lay-event="edit" class="btn_a layui-btn layui-btn-xs">认证</a>
                        {{#  } else { }}
                        <a lay-event="noClick"
                            class="btn_a layui-btn layui-btn-primary layui-btn-xs layui-btn-disabled">认证</a>
                        {{#  }}}
                        <a lay-event="watchDetail" class="btn_a layui-btn layui-btn-primary layui-btn-xs">查看日志</a>
                    </script>
                </div>
                <div class="show4" style="display: none;">
                    <table id="user_table3" lay-filter="test3" lay-data="{id: 'testReload3'}"></table>
                    <script type="text/html" id="barDemoc">
                        {{#  if(d.groupAuth == "0"){ }}
                        <a lay-event="edit" class="btn_a layui-btn layui-btn-xs">认证</a>
                        {{#  } else { }}
                        <a lay-event="noClick"
                            class="btn_a layui-btn layui-btn-primary layui-btn-xs layui-btn-disabled">认证</a>
                        {{#  }}}
                        <a lay-event="watchDetail" class="btn_a layui-btn layui-btn-primary layui-btn-xs">查看日志</a>
                    </script>
                </div>
                <div class="show5" style="display: none;">
                    <table id="user_table4" lay-filter="test4" lay-data="{id: 'testReload4'}"></table>
                    <script type="text/html" id="barDemod">
                        {{#  if(d.groupAuth == "0"){ }}
                        <a lay-event="edit" class="btn_a layui-btn layui-btn-xs">认证</a>
                        {{#  } else { }}
                        <a lay-event="noClick"
                            class="btn_a layui-btn layui-btn-primary layui-btn-xs layui-btn-disabled">认证</a>
                        {{#  }}}
                        <a lay-event="watchDetail" class="btn_a layui-btn layui-btn-primary layui-btn-xs">查看日志</a>
                    </script>
                </div>
                <!-- 表格结束 -->
            </div>
        </div>
    </div>
    </div>
</body>

</html>

<script>
    layui.use(['laydate', 'table'], function () {
        var table = layui.table;
        var form = layui.form;

        var laydate = layui.laydate;

        //日期范围
        laydate.render({
            elem: '#test6',
            range: true
        });


        var index = layer.load(1); //添加laoding,0-2两种方式

        //第一个实例
        var ins = table.render({
            elem: '#user_table', //指定原始表格元素选择器（推荐id选择器）
            // height: 600,
            width: "100%",
            where: {
                groupType: '4'
            },
            // 附加参数，post token
            // where: { 'token': token },
            loading: true,
            method: 'get',
            url: getGroupUserPage, //数据接口
            page: true, //开启分页
            // toolbar: 'default', //开启工具栏，此处显示默认图标
            cols: [
                [ //表头
                    // { type: 'checkbox', fixed: 'left' },
                    {
                        type: 'checkbox'
                    },
                    {
                        field: 'id',
                        title: 'ID',
                        width: 100
                    },
                    {
                        field: 'enterpriseName',
                        title: '名称',
                        width: 150
                    },
                    {
                        field: 'enterpriseAddress',
                        title: '住所',
                        width: 150
                    },
                    {
                        field: 'legalRepresentative',
                        title: '法定代表人',
                        width: 150
                    },
                    {
                        field: 'registeredFund',
                        title: '注册资金',
                        width: 150,
                        templet: function (d) {
                            if (d.registeredFund) {
                                return d.registeredFund + "万元"
                            } else {
                                return ""
                            }
                        }
                    },
                    {
                        field: 'businessLicenseNo',
                        title: '统一社会信用代码',
                        width: 150
                    },
                    {
                        field: 'legalPersonIdCard',
                        title: '法人身份证号',
                        width: 150
                    },
                    {
                        field: 'idCardFrontUrl',
                        title: '法人身份证正面照片',
                        width: 150,
                        templet: function (d) {
                            if (d.idCardFrontUrl != "" && d.idCardFrontUrl != null) {
                                return "<div style='height:100%' onclick='show_img(this)' ><img style='height:100%' src='" +
                                    d
                                    .idCardFrontUrl + "'></div>'"
                            } else {
                                return ""
                            }
                        }
                    },
                    {
                        field: 'idCardReverseUrl',
                        title: '法人身份证反面照片',
                        width: 150,
                        templet: function (d) {
                            if (d.idCardReverseUrl != "" && d.idCardReverseUrl != null) {
                                return "<div style='height:100%' onclick='show_img(this)' ><img style='height:100%' src='" +
                                    d
                                    .idCardReverseUrl + "'></div>'"
                            } else {
                                return ""
                            }
                        }
                    },
                    {
                        field: 'linkman',
                        title: '联系人',
                        width: 150
                    },
                    {
                        field: 'fixationTel',
                        title: '固定电话',
                        width: 150
                    },
                    {
                        field: 'linkTel',
                        title: '联系电话',
                        width: 150
                    },
                    {
                        field: 'businessLine',
                        title: '业务范围',
                        width: 150
                    },
                    {
                        field: 'movementArea',
                        title: '活动区域',
                        width: 150
                    },
                    {
                        field: 'competentOrganization',
                        title: '业务主管单位',
                        width: 150
                    },
                    {
                        field: 'organizationinCorporationCertificateUrl',
                        title: '社会团体法人登记证书',
                        width: 150,
                        templet: function (d) {
                            if (d.organizationinCorporationCertificateUrl != "" && d
                                .organizationinCorporationCertificateUrl != null) {
                                return "<div style='height:100%' onclick='show_img(this)' ><img style='height:100%' src='" +
                                    d
                                    .organizationinCorporationCertificateUrl + "'></div>'"
                            } else {
                                return ""
                            }
                        }
                    },
                    {
                        field: 'validityDate',
                        title: '有效期',
                        width: 150
                    },
                    {
                        fixed: 'right',
                        title: "操作",
                        width: 250,
                        align: 'center',
                        toolbar: '#barDemo'
                    }
                ]
            ],
            id: 'testReload',
            done: function (res) {
                layer.close(index)
                if (res.msg == "2") {
                    parent.window.location.href = getRequestPrefix() + "/footBallAdmin/login.html"
                }
            }
        });
        //第er个实例
        var ins1 = table.render({
            elem: '#user_table1', //指定原始表格元素选择器（推荐id选择器）
            // height: 600,
            width: "100%",
            // 附加参数，post token
            where: {
                'groupType': 3
            },
            loading: true,
            method: 'get',
            url: getGroupUserPage, //数据接口
            page: true, //开启分页
            // toolbar: 'default', //开启工具栏，此处显示默认图标
            cols: [
                [ //表头
                    // { type: 'checkbox', fixed: 'left' },
                    {
                        type: 'checkbox'
                    },
                    {
                        field: 'id',
                        title: 'ID',
                        width: 100
                    },
                    {
                        field: 'enterpriseName',
                        title: '名称',
                        width: 150
                    },
                    {
                        field: 'enterpriseAddress',
                        title: '住所',
                        width: 150
                    },
                    {
                        field: 'legalRepresentative',
                        title: '法定代表人',
                        width: 150
                    },
                    {
                        field: 'registeredFund',
                        title: '注册资金',
                        width: 150,
                        templet: function (d) {
                            if (d.registeredFund) {
                                return d.registeredFund + "万元"
                            } else {
                                return ""
                            }
                        }
                    },
                    {
                        field: 'businessLicenseNo',
                        title: '统一社会信用代码',
                        width: 150
                    },
                    {
                        field: 'legalPersonIdCard',
                        title: '法人身份证号',
                        width: 150
                    },
                    {
                        field: 'idCardFrontUrl',
                        title: '法人身份证正面照片',
                        width: 150,
                        templet: function (d) {
                            if (d.idCardFrontUrl != "" && d.idCardFrontUrl != null) {
                                return "<div style='height:100%' onclick='show_img(this)' ><img style='height:100%' src='" +
                                    d
                                    .idCardFrontUrl + "'></div>'"
                            } else {
                                return ""
                            }
                        }
                    },
                    {
                        field: 'idCardReverseUrl',
                        title: '法人身份证反面照片',
                        width: 150,
                        templet: function (d) {
                            if (d.idCardReverseUrl != "" && d.idCardReverseUrl != null) {
                                return "<div style='height:100%' onclick='show_img(this)' ><img style='height:100%' src='" +
                                    d
                                    .idCardReverseUrl + "'></div>'"
                            } else {
                                return ""
                            }
                        }
                    },
                    {
                        field: 'linkman',
                        title: '联系人',
                        width: 150
                    },
                    {
                        field: 'fixationTel',
                        title: '固定电话',
                        width: 150
                    },
                    {
                        field: 'linkTel',
                        title: '联系电话',
                        width: 150
                    },
                    {
                        field: 'type',
                        title: '类型',
                        width: 150
                    },
                    {
                        field: 'establishmentData',
                        title: '成立时间',
                        width: 150
                    },
                    {
                        field: 'operatingPeriod',
                        title: '营业期限',
                        width: 150
                    },
                    {
                        field: 'businessScope',
                        title: '经营范围',
                        width: 150
                    },
                    {
                        field: 'certificationAuthority',
                        title: '发证机关',
                        width: 150
                    },
                    {
                        field: 'businessLicenseImg',
                        title: '营业执照',
                        width: 150,
                        templet: function (d) {
                            if (d.businessLicenseImg != "" && d.businessLicenseImg != null) {
                                return "<div style='height:100%' onclick='show_img(this)' ><img style='height:100%' src='" +
                                    d
                                    .businessLicenseImg + "'></div>'"
                            } else {
                                return ""
                            }
                        }
                    },
                    {
                        fixed: 'right',
                        title: "操作",
                        width: 250,
                        align: 'center',
                        toolbar: '#barDemoa'
                    }
                ]
            ],
            id: 'testReload1',
            done: function (res) {
                layer.close(index)
                if (res.msg == "2") {
                    parent.window.location.href = getRequestPrefix() + "/footBallAdmin/login.html"
                }
            }
        });
        //第san个实例
        var ins2 = table.render({
            elem: '#user_table2', //指定原始表格元素选择器（推荐id选择器）
            // height: 600,
            width: "100%",
            // 附加参数，post token
            where: {
                'groupType': 2,
                'jobType': 1
            },
            loading: true,
            method: 'get',
            url: getGroupUserPage, //数据接口
            page: true, //开启分页
            // toolbar: 'default', //开启工具栏，此处显示默认图标
            cols: [
                [ //表头
                    // { type: 'checkbox', fixed: 'left' },
                    {
                        type: 'checkbox'
                    },
                    {
                        field: 'id',
                        title: 'ID',
                        width: 100
                    },
                    {
                        field: 'enterpriseName',
                        title: '名称',
                        width: 150
                    },
                    {
                        field: 'enterpriseAddress',
                        title: '住所',
                        width: 150
                    },
                    {
                        field: 'legalRepresentative',
                        title: '法定代表人',
                        width: 150
                    },
                    {
                        field: 'registeredFund',
                        title: '注册资金',
                        width: 150,
                        templet: function (d) {
                            if (d.registeredFund) {
                                return d.registeredFund + "万元"
                            } else {
                                return ""
                            }
                        }
                    },
                    {
                        field: 'businessLicenseNo',
                        title: '统一社会信用代码',
                        width: 150
                    },
                    {
                        field: 'legalPersonIdCard',
                        title: '法人身份证号',
                        width: 150
                    },
                    {
                        field: 'idCardFrontUrl',
                        title: '法人身份证正面照片',
                        width: 150,
                        templet: function (d) {
                            if (d.idCardFrontUrl != "" && d.idCardFrontUrl != null) {
                                return "<div style='height:100%' onclick='show_img(this)' ><img style='height:100%' src='" +
                                    d
                                    .idCardFrontUrl + "'></div>'"
                            } else {
                                return ""
                            }
                        }
                    },
                    {
                        field: 'idCardReverseUrl',
                        title: '法人身份证反面照片',
                        width: 150,
                        templet: function (d) {
                            if (d.idCardReverseUrl != "" && d.idCardReverseUrl != null) {
                                return "<div style='height:100%' onclick='show_img(this)' ><img style='height:100%' src='" +
                                    d
                                    .idCardReverseUrl + "'></div>'"
                            } else {
                                return ""
                            }
                        }
                    },
                    {
                        field: 'linkman',
                        title: '联系人',
                        width: 150
                    },
                    {
                        field: 'fixationTel',
                        title: '固定电话',
                        width: 150
                    },
                    {
                        field: 'linkTel',
                        title: '联系电话',
                        width: 150
                    },
                    {
                        field: 'type',
                        title: '类型',
                        width: 150
                    },
                    {
                        field: 'establishmentData',
                        title: '成立时间',
                        width: 150
                    },
                    {
                        field: 'operatingPeriod',
                        title: '营业期限',
                        width: 150
                    },
                    {
                        field: 'businessScope',
                        title: '经营范围',
                        width: 150
                    },
                    {
                        field: 'certificationAuthority',
                        title: '发证机关',
                        width: 150
                    },
                    {
                        field: 'businessLicenseImg',
                        title: '营业执照',
                        width: 150,
                        templet: function (d) {
                            if (d.businessLicenseImg != "" && d.businessLicenseImg != null) {
                                return "<div style='height:100%' onclick='show_img(this)' ><img style='height:100%' src='" +
                                    d
                                    .businessLicenseImg + "'></div>'"
                            } else {
                                return ""
                            }
                        }
                    },
                    {
                        fixed: 'right',
                        title: "操作",
                        width: 250,
                        align: 'center',
                        toolbar: '#barDemob'
                    }
                ]
            ],
            id: 'testReload2',
            done: function (res) {
                layer.close(index)
                if (res.msg == "2") {
                    parent.window.location.href = getRequestPrefix() + "/footBallAdmin/login.html"
                }
            }
        });
        //第4个实例
        var ins3 = table.render({
            elem: '#user_table3', //指定原始表格元素选择器（推荐id选择器）
            // height: 600,
            width: "100%",
            // 附加参数，post token
            where: {
                'groupType': 2,
                'jobType': 2
            },
            loading: true,
            method: 'get',
            url: getGroupUserPage, //数据接口
            page: true, //开启分页
            // toolbar: 'default', //开启工具栏，此处显示默认图标
            cols: [
                [ //表头
                    // { type: 'checkbox', fixed: 'left' },
                    {
                        type: 'checkbox'
                    },
                    {
                        field: 'id',
                        title: 'ID',
                        width: 100
                    },
                    {
                        field: 'enterpriseName',
                        title: '名称',
                        width: 150
                    },
                    {
                        field: 'enterpriseAddress',
                        title: '住所',
                        width: 150
                    },
                    {
                        field: 'legalRepresentative',
                        title: '法定代表人',
                        width: 150
                    },
                    {
                        field: 'registeredFund',
                        title: '注册资金',
                        width: 150,
                        templet: function (d) {
                            if (d.registeredFund) {
                                return d.registeredFund + "万元"
                            } else {
                                return ""
                            }
                        }
                    },
                    {
                        field: 'businessLicenseNo',
                        title: '统一社会信用代码',
                        width: 150
                    },
                    {
                        field: 'legalPersonIdCard',
                        title: '法人身份证号',
                        width: 150
                    },
                    {
                        field: 'idCardFrontUrl',
                        title: '法人身份证正面照片',
                        width: 150,
                        templet: function (d) {
                            if (d.idCardFrontUrl != "" && d.idCardFrontUrl != null) {
                                return "<div style='height:100%' onclick='show_img(this)' ><img style='height:100%' src='" +
                                    d
                                    .idCardFrontUrl + "'></div>'"
                            } else {
                                return ""
                            }
                        }
                    },
                    {
                        field: 'idCardReverseUrl',
                        title: '法人身份证反面照片',
                        width: 150,
                        templet: function (d) {
                            if (d.idCardReverseUrl != "" && d.idCardReverseUrl != null) {
                                return "<div style='height:100%' onclick='show_img(this)' ><img style='height:100%' src='" +
                                    d
                                    .idCardReverseUrl + "'></div>'"
                            } else {
                                return ""
                            }
                        }
                    },
                    {
                        field: 'linkman',
                        title: '联系人',
                        width: 150
                    },
                    {
                        field: 'fixationTel',
                        title: '固定电话',
                        width: 150
                    },
                    {
                        field: 'linkTel',
                        title: '联系电话',
                        width: 150
                    },
                    {
                        field: 'businessLine',
                        title: '业务范围',
                        width: 150
                    },
                    {
                        field: 'movementArea',
                        title: '活动区域',
                        width: 150
                    },
                    {
                        field: 'competentOrganization',
                        title: '业务主管单位',
                        width: 150
                    },
                    {
                        field: 'organizationinCorporationCertificateUrl',
                        title: '社会团体法人登记证书',
                        width: 150
                    },
                    {
                        field: 'validityDate',
                        title: '有效期',
                        width: 150
                    },
                    {
                        fixed: 'right',
                        title: "操作",
                        width: 250,
                        align: 'center',
                        toolbar: '#barDemoc'
                    }
                ]
            ],
            id: 'testReload3',
            done: function (res) {
                layer.close(index)
                if (res.msg == "2") {
                    parent.window.location.href = getRequestPrefix() + "/footBallAdmin/login.html"
                }
            }
        });

        //第5个实例
        var ins4 = table.render({
            elem: '#user_table4', //指定原始表格元素选择器（推荐id选择器）
            // height: 600,
            width: "100%",
            // 附加参数，post token
            where: {
                'groupType': 6,
                'jobType': ""
            },
            loading: true,
            method: 'get',
            url: getGroupUserPage, //数据接口
            page: true, //开启分页
            // toolbar: 'default', //开启工具栏，此处显示默认图标
            cols: [
                [ //表头
                    // { type: 'checkbox', fixed: 'left' },
                    {
                        type: 'checkbox'
                    },
                    {
                        field: 'id',
                        title: 'ID',
                        width: 150
                    },
                    {
                        field: 'name',
                        title: '各地足协名称',
                        width: 150
                    },
                    {
                        field: 'businessLine',
                        title: '业务范围',
                        width: 150
                    },
                    {
                        field: 'address',
                        title: '地址',
                        width: 150
                    },
                    {
                        field: 'legalRepresentative',
                        title: '法定代表人',
                        width: 150
                    },
                    {
                        field: 'movementArea',
                        title: '活动区域',
                        width: 150
                    },
                    {
                        field: 'registeredFund',
                        title: '注册资金',
                        width: 150
                    },
                    {
                        field: 'competentOrganization',
                        title: '业务主管单位',
                        width: 150
                    },
                    {
                        field: 'businessLicenseNo',
                        title: '统一社会信用代码',
                        width: 150
                    },
                    {
                        field: 'validityDate',
                        title: '有效期',
                        width: 150
                    },
                    {
                        field: 'organizationinCorporationCertificateUrl',
                        title: '社会团体法人登记证书',
                        width: 150,
                        templet: function (d) {
                            if (d.organizationinCorporationCertificateUrl != null && d
                                .organizationinCorporationCertificateUrl != "") {
                                return "<div style='width: 50%; float: left;' onclick='show_img(this)' ><img style='width: 100%' src='" +
                                    d.organizationinCorporationCertificateUrl +
                                    "'></div>"
                            } else {
                                return ""
                            }
                        }
                    },
                    {
                        field: 'legalPersonIdCard',
                        title: '法定代表人身份证号码',
                        width: 150
                    },
                    {
                        field: 'idCardFrontUrl',
                        title: '法人身份证正面和反面',
                        width: 150,
                        templet: function (d) {
                            if ((d.idCardFrontUrl !== "" && d.idCardFrontUrl !== null) || (d
                                    .idCardReverseUrl !== "" && d.idCardReverseUrl !== null)) {
                                return "<div style='width: 50%; float: left;' onclick='show_img(this)' ><img style='width: 100%' src='" +
                                    d.idCardFrontUrl +
                                    "'></div><div style='width: 50%; float: left;' onclick='show_img(this)' ><img style='width: 100%' src='" +
                                    d.idCardReverseUrl +
                                    "'></div>"
                            } else {
                                return ""
                            }
                        }
                    },
                    {
                        field: 'linkman',
                        title: '联系人',
                        width: 150
                    },
                    {
                        field: 'fixationTel',
                        title: '固定电话',
                        width: 150
                    },
                    {
                        field: 'linkTel',
                        title: '联系电话',
                        width: 150
                    },
                    {
                        field: 'addTime',
                        title: '创建时间',
                        width: 150
                    },
                    {
                        fixed: 'right',
                        title: "操作",
                        width: 250,
                        align: 'center',
                        toolbar: '#barDemod'
                    }
                ]
            ],
            id: 'testReload4',
            done: function (res) {
                layer.close(index)
                if (res.msg == "2") {
                    parent.window.location.href = getRequestPrefix() + "/footBallAdmin/login.html"
                }
            }
        });
        //头部输入框筛选功能
        var $ = layui.$,
            active = {

                reload: function () {

                    var name = $('#name');
                    var interest = $("#interest option:selected").val() //审核状态’
                    var area = $('#area').val(); //省
                    var city = $('#city').val(); //市
                    var test6 = $('#test6').val(); //注册日期范围
                    var zhucezijin = $('#zhucezijin').val(); //注册资金
                    var startDate
                    var endDate
                    if (test6 != '') {
                        startDate = test6.split(' - ')[0]
                        endDate = test6.split(' - ')[1]
                    } else {
                        startDate = ''
                        endDate = ''
                    }

                    // 执行重载（重新加载数据表格）
                    table.reload('testReload', {
                        page: {
                            curr: 1 //重新从第 1 页开始
                        },
                        where: {
                            "enterpriseName": name.val(),
                            "state": interest,
                            "area": area,
                            "city": city,
                            "registeredFund": zhucezijin,
                            "startDate": startDate,
                            "endDate": endDate,
                        }
                    }, 'data');
                    table.reload('testReload1', {
                        page: {
                            curr: 1 //重新从第 1 页开始
                        },
                        where: {
                            "enterpriseName": name.val(),
                            "state": interest,
                            "area": area,
                            "city": city,
                            "registeredFund": zhucezijin,
                            "startDate": startDate,
                            "endDate": endDate,
                        }
                    }, 'data');
                    table.reload('testReload2', {
                        page: {
                            curr: 1 //重新从第 1 页开始
                        },
                        where: {
                            "enterpriseName": name.val(),
                            "state": interest,
                            "area": area,
                            "city": city,
                            "registeredFund": zhucezijin,
                            "startDate": startDate,
                            "endDate": endDate,
                        }
                    }, 'data');
                    table.reload('testReload3', {
                        page: {
                            curr: 1 //重新从第 1 页开始
                        },
                        where: {
                            "enterpriseName": name.val(),
                            "state": interest,
                            "area": area,
                            "city": city,
                            "registeredFund": zhucezijin,
                            "startDate": startDate,
                            "endDate": endDate,
                        }
                    }, 'data');
                    table.reload('testReload4', {
                        page: {
                            curr: 1 //重新从第 1 页开始
                        },
                        where: {
                            "enterpriseName": name.val(),
                            "state": interest,
                            "area": area,
                            "city": city,
                            "registeredFund": zhucezijin,
                            "startDate": startDate,
                            "endDate": endDate,
                        }
                    }, 'data');
                },

                renzhengPL: function () {
                    var selectData
                    if ($(".show1").css("display") == 'block') {
                        selectData = layui.table.checkStatus('testReload');
                    } else if ($(".show2").css("display") == 'block') {
                        selectData = layui.table.checkStatus('testReload1');
                    } else if ($(".show3").css("display") == 'block') {
                        selectData = layui.table.checkStatus('testReload2');
                    } else if ($(".show4").css("display") == 'block') {
                        selectData = layui.table.checkStatus('testReload3');
                    } else {
                        selectData = layui.table.checkStatus('testReload4');
                    }


                    if (selectData.data.length <= 0) {
                        layer.msg('当前没有选中的信息')
                        return
                    } else {
                        layer.open({
                            content: "edit_groupAuthNew.html",
                            type: 2, //打开的窗口的类型
                            area: ["600px", "230px"],
                            title: "团体认证",
                            // btn: ['确认', '取消'],//开启显示按钮功能
                            // btnAlign: 'c',//居中显示按钮
                            // shade:true,
                            shadeClose: true,
                            success: function (layero, index) {
                                // console.log(data)//获取点击行的数据,获取打开的iframe

                                var body = layer.getChildFrame('body', index);
                                var iframeWin = window[layero.find('iframe')[0]['name']];

                                var new_arr = []
                                for (var i = 0; i < selectData.data.length; i++) {
                                    new_arr.push(selectData.data[i].id)
                                }
                                body.find('#id').val(JSON.stringify(new_arr.join(',')))
                            }
                        })
                    }
                }
            };


        //给查询添加点击事件
        $('.search-btn').on('click', function () {
            var type = $(this).data('type');
            active[type] ? active[type].call(this) : '';
            //一定要阻止表单的默认行为（刷新）
            return false
        });


        //监听头工具栏事件


        //监听点击的按钮，获取行信息
        table.on('tool(test)', function (obj) { //注：tool 是工具条事件名，test 是 table 原始容器的属性 lay-filter="对应的值"
            //获得当前行数据
            var $ = layui.$
            var data = obj.data,
                layEvent = obj.event; //获得 lay-event 对应的值
            if (layEvent === "edit") {
                // layer.msg('修改操作');
                layer.open({
                    content: "edit_groupAuth.html",
                    type: 2, //打开的窗口的类型
                    area: ["600px", "600px"],
                    title: "团体认证",
                    // btn: ['确认', '取消'],//开启显示按钮功能
                    // btnAlign: 'c',//居中显示按钮
                    // shade:true,
                    shadeClose: true,
                    success: function (layero, index) {
                        // console.log(data)//获取点击行的数据,获取打开的iframe

                        var body = layer.getChildFrame('body', index);
                        var iframeWin = window[layero.find('iframe')[0]['name']];
                        body.find('#enterpriseName').text(data.enterpriseName)
                        body.find('#enterpriseAddress').text(data.enterpriseAddress)
                        body.find('#legalRepresentative').text(data.legalRepresentative)
                        body.find('#registeredFund').text(data.registeredFund)
                        body.find('#businessLicenseNo').text(data.businessLicenseNo)
                        body.find('#legalPersonIdCard').text(data.legalPersonIdCard)
                        body.find('#idCardFrontUrl').attr("src", data.idCardFrontUrl)
                        body.find('#idCardReverseUrl').attr("src", data.idCardReverseUrl)
                        body.find('#linkman').text(data.linkman)
                        body.find('#fixationTel').text(data.fixationTel)
                        body.find('#linkTel').text(data.linkTel)
                        body.find('#businessLine').text(data.businessLine)
                        body.find('#movementArea').text(data.movementArea)
                        body.find('#competentOrganization').text(data.competentOrganization)
                        body.find('#organizationinCorporationCertificateUrl').attr("src",
                            data.organizationinCorporationCertificateUrl)
                        body.find('#validityDate').text(data.validityDate)
                        body.find('#id').val(data.id)
                    }
                })
            }
            if (layEvent === "watchDetail") {
                layer.open({
                    content: "groupDetail.html",
                    type: 2, //打开的窗口的类型
                    area: ["600px", "600px"],
                    title: "操作日志",
                    // btn: ['确认', '取消'],//开启显示按钮功能
                    // btnAlign: 'c',//居中显示按钮
                    // shade:true,
                    shadeClose: true,
                    success: function (layero, index) {
                        var iframe = window['layui-layer-iframe' + index];
                        //调用子页面的全局函数
                        iframe.child(data.id)
                    }
                })
            }
        });
        //监听点击的按钮，获取行信息
        table.on('tool(test1)', function (obj) { //注：tool 是工具条事件名，test 是 table 原始容器的属性 lay-filter="对应的值"
            //获得当前行数据
            var $ = layui.$
            var data = obj.data,
                layEvent = obj.event; //获得 lay-event 对应的值
            if (layEvent === "edit") {
                // layer.msg('修改操作');
                layer.open({
                    content: "edit_groupAuth1.html",
                    type: 2, //打开的窗口的类型
                    area: ["600px", "600px"],
                    title: "团体认证",
                    // btn: ['确认', '取消'],//开启显示按钮功能
                    // btnAlign: 'c',//居中显示按钮
                    // shade:true,
                    shadeClose: true,
                    success: function (layero, index) {
                        // console.log(data)//获取点击行的数据,获取打开的iframe

                        var body = layer.getChildFrame('body', index);
                        var iframeWin = window[layero.find('iframe')[0]['name']];
                        body.find('#enterpriseName').text(data.enterpriseName)
                        body.find('#enterpriseAddress').text(data.enterpriseAddress)
                        body.find('#legalRepresentative').text(data.legalRepresentative)
                        body.find('#registeredFund').text(data.registeredFund)
                        body.find('#businessLicenseNo').text(data.businessLicenseNo)
                        body.find('#legalPersonIdCard').text(data.legalPersonIdCard)
                        body.find('#idCardFrontUrl').attr("src", data.idCardFrontUrl)
                        body.find('#idCardReverseUrl').attr("src", data.idCardReverseUrl)
                        body.find('#linkman').text(data.linkman)
                        body.find('#fixationTel').text(data.fixationTel)
                        body.find('#linkTel').text(data.linkTel)
                        body.find('#type').text(data.type)
                        body.find('#establishmentData').text(data.establishmentData)
                        body.find('#operatingPeriod').text(data.operatingPeriod)
                        body.find('#businessScope').text(data.businessScope)
                        body.find('#certificationAuthority').text(data
                            .certificationAuthority)
                        body.find('#businessLicenseImg').attr("src", data
                            .businessLicenseImg)
                        body.find('#id').val(data.id)
                    }
                })
            }
            if (layEvent === "watchDetail") {
                layer.open({
                    content: "groupDetail.html",
                    type: 2, //打开的窗口的类型
                    area: ["600px", "600px"],
                    title: "操作日志",
                    // btn: ['确认', '取消'],//开启显示按钮功能
                    // btnAlign: 'c',//居中显示按钮
                    // shade:true,
                    shadeClose: true,
                    success: function (layero, index) {
                        var iframe = window['layui-layer-iframe' + index];
                        //调用子页面的全局函数
                        iframe.child(data.id)
                    }
                })
            }
        });
        //监听点击的按钮，获取行信息
        table.on('tool(test2)', function (obj) { //注：tool 是工具条事件名，test 是 table 原始容器的属性 lay-filter="对应的值"
            //获得当前行数据
            var $ = layui.$
            var data = obj.data,
                layEvent = obj.event; //获得 lay-event 对应的值
            if (layEvent === "edit") {
                // layer.msg('修改操作');
                layer.open({
                    content: "edit_groupAuth1.html",
                    type: 2, //打开的窗口的类型
                    area: ["600px", "600px"],
                    title: "团体认证",
                    // btn: ['确认', '取消'],//开启显示按钮功能
                    // btnAlign: 'c',//居中显示按钮
                    // shade:true,
                    shadeClose: true,
                    success: function (layero, index) {
                        // console.log(data)//获取点击行的数据,获取打开的iframe

                        var body = layer.getChildFrame('body', index);
                        var iframeWin = window[layero.find('iframe')[0]['name']];
                        body.find('#enterpriseName').text(data.enterpriseName)
                        body.find('#enterpriseAddress').text(data.enterpriseAddress)
                        body.find('#legalRepresentative').text(data.legalRepresentative)
                        body.find('#registeredFund').text(data.registeredFund)
                        body.find('#businessLicenseNo').text(data.businessLicenseNo)
                        body.find('#legalPersonIdCard').text(data.legalPersonIdCard)
                        body.find('#idCardFrontUrl').attr("src", data.idCardFrontUrl)
                        body.find('#idCardReverseUrl').attr("src", data.idCardReverseUrl)
                        body.find('#linkman').text(data.linkman)
                        body.find('#fixationTel').text(data.fixationTel)
                        body.find('#linkTel').text(data.linkTel)
                        body.find('#type').text(data.type)
                        body.find('#establishmentData').text(data.establishmentData)
                        body.find('#operatingPeriod').text(data.operatingPeriod)
                        body.find('#businessScope').text(data.businessScope)
                        body.find('#certificationAuthority').text(data
                            .certificationAuthority)
                        body.find('#businessLicenseImg').attr("src", data
                            .businessLicenseImg)
                        body.find('#id').val(data.id)
                    }
                })
            }
            if (layEvent === "watchDetail") {
                layer.open({
                    content: "groupDetail.html",
                    type: 2, //打开的窗口的类型
                    area: ["600px", "600px"],
                    title: "操作日志",
                    // btn: ['确认', '取消'],//开启显示按钮功能
                    // btnAlign: 'c',//居中显示按钮
                    // shade:true,
                    shadeClose: true,
                    success: function (layero, index) {
                        var iframe = window['layui-layer-iframe' + index];
                        //调用子页面的全局函数
                        iframe.child(data.id)
                    }
                })
            }
        });
        //监听点击的按钮，获取行信息
        table.on('tool(test3)', function (obj) { //注：tool 是工具条事件名，test 是 table 原始容器的属性 lay-filter="对应的值"
            //获得当前行数据
            var $ = layui.$
            var data = obj.data,
                layEvent = obj.event; //获得 lay-event 对应的值
            if (layEvent === "edit") {
                // layer.msg('修改操作');
                layer.open({
                    content: "edit_groupAuth.html",
                    type: 2, //打开的窗口的类型
                    area: ["600px", "600px"],
                    title: "团体认证",
                    // btn: ['确认', '取消'],//开启显示按钮功能
                    // btnAlign: 'c',//居中显示按钮
                    // shade:true,
                    shadeClose: true,
                    success: function (layero, index) {
                        // console.log(data)//获取点击行的数据,获取打开的iframe

                        var body = layer.getChildFrame('body', index);
                        var iframeWin = window[layero.find('iframe')[0]['name']];

                        body.find('#enterpriseName').text(data.enterpriseName)
                        body.find('#enterpriseAddress').text(data.enterpriseAddress)
                        body.find('#legalRepresentative').text(data.legalRepresentative)
                        body.find('#registeredFund').text(data.registeredFund)
                        body.find('#businessLicenseNo').text(data.businessLicenseNo)
                        body.find('#legalPersonIdCard').text(data.legalPersonIdCard)
                        body.find('#idCardFrontUrl').attr("src", data.idCardFrontUrl)
                        body.find('#idCardReverseUrl').attr("src", data.idCardReverseUrl)
                        body.find('#linkman').text(data.linkman)
                        body.find('#fixationTel').text(data.fixationTel)
                        body.find('#linkTel').text(data.linkTel)
                        body.find('#businessLine').text(data.businessLine)
                        body.find('#movementArea').text(data.movementArea)
                        body.find('#competentOrganization').text(data.competentOrganization)
                        body.find('#organizationinCorporationCertificateUrl').attr("src",
                            data.organizationinCorporationCertificateUrl)
                        body.find('#validityDate').text(data.validityDate)
                        body.find('#id').val(data.id)

                    }
                })
            }
            if (layEvent === "watchDetail") {
                layer.open({
                    content: "groupDetail.html",
                    type: 2, //打开的窗口的类型
                    area: ["600px", "600px"],
                    title: "操作日志",
                    // btn: ['确认', '取消'],//开启显示按钮功能
                    // btnAlign: 'c',//居中显示按钮
                    // shade:true,
                    shadeClose: true,
                    success: function (layero, index) {
                        var iframe = window['layui-layer-iframe' + index];
                        //调用子页面的全局函数
                        iframe.child(data.id)
                    }
                })
            }
        });

        table.on('tool(test4)', function (obj) { //注：tool 是工具条事件名，test 是 table 原始容器的属性 lay-filter="对应的值"
            //获得当前行数据
            var $ = layui.$
            var data = obj.data,
                layEvent = obj.event; //获得 lay-event 对应的值
            if (layEvent === "edit") {
                // layer.msg('修改操作');
                layer.open({
                    content: "edit_groupAuth.html",
                    type: 2, //打开的窗口的类型
                    area: ["600px", "600px"],
                    title: "团体认证",
                    // btn: ['确认', '取消'],//开启显示按钮功能
                    // btnAlign: 'c',//居中显示按钮
                    // shade:true,
                    shadeClose: true,
                    success: function (layero, index) {
                        // console.log(data)//获取点击行的数据,获取打开的iframe

                        var body = layer.getChildFrame('body', index);
                        var iframeWin = window[layero.find('iframe')[0]['name']];
                        body.find('#enterpriseName').text(data.enterpriseName)
                        body.find('#enterpriseAddress').text(data.enterpriseAddress)
                        body.find('#legalRepresentative').text(data.legalRepresentative)
                        body.find('#registeredFund').text(data.registeredFund)
                        body.find('#businessLicenseNo').text(data.businessLicenseNo)
                        body.find('#legalPersonIdCard').text(data.legalPersonIdCard)
                        body.find('#idCardFrontUrl').attr("src", data.idCardFrontUrl)
                        body.find('#idCardReverseUrl').attr("src", data.idCardReverseUrl)
                        body.find('#linkman').text(data.linkman)
                        body.find('#fixationTel').text(data.fixationTel)
                        body.find('#linkTel').text(data.linkTel)
                        body.find('#businessLine').text(data.businessLine)
                        body.find('#movementArea').text(data.movementArea)
                        body.find('#competentOrganization').text(data.competentOrganization)
                        body.find('#organizationinCorporationCertificateUrl').attr("src",
                            data.organizationinCorporationCertificateUrl)
                        body.find('#validityDate').text(data.validityDate)
                        body.find('#id').val(data.id)
                    }
                })
            }
            if (layEvent === "watchDetail") {
                layer.open({
                    content: "groupDetail.html",
                    type: 2, //打开的窗口的类型
                    area: ["600px", "600px"],
                    title: "操作日志",
                    // btn: ['确认', '取消'],//开启显示按钮功能
                    // btnAlign: 'c',//居中显示按钮
                    // shade:true,
                    shadeClose: true,
                    success: function (layero, index) {
                        var iframe = window['layui-layer-iframe' + index];
                        //调用子页面的全局函数
                        iframe.child(data.id)
                    }
                })
            }
        });

        $(".search1").on("click", function () {
            $(".show1").css("display", "block");
            $(".show2").css("display", "none");
            $(".show3").css("display", "none");
            $(".show4").css("display", "none");
            $(".show5").css("display", "none");
            table.reload("testReload")
        })
        $(".search2").on("click", function () {
            $(".show1").css("display", "none");
            $(".show2").css("display", "block");
            $(".show3").css("display", "none");
            $(".show4").css("display", "none");
            $(".show5").css("display", "none");
            table.reload("testReload1")
        })
        $(".search3").on("click", function () {
            $(".show1").css("display", "none");
            $(".show2").css("display", "none");
            $(".show3").css("display", "block");
            $(".show4").css("display", "none");
            $(".show5").css("display", "none");
            table.reload("testReload2")
        })
        $(".search4").on("click", function () {
            $(".show1").css("display", "none");
            $(".show2").css("display", "none");
            $(".show3").css("display", "none");
            $(".show4").css("display", "block");
            $(".show5").css("display", "none");
            table.reload("testReload3")
        })
        $(".search5").on("click", function () {
            $(".show1").css("display", "none");
            $(".show2").css("display", "none");
            $(".show3").css("display", "none");
            $(".show4").css("display", "none");
            $(".show5").css("display", "block");
            table.reload("testReload4")
        })
    });

    /**
     * 点击放大图片
     * @param t
     */
    function show_img(t) {
        var t = $(t).find("img");
        //页面层
        layer.open({
            type: 1,
            skin: 'layui-layer-rim', //加上边框
            area: ['70%', '80%'], //宽高
            shadeClose: true, //开启遮罩关闭
            end: function (index, layero) {
                return false;
            },
            content: '<div style="text-align:center;width:100%;height: 100%;overflow: hidden"><img src="' + $(t)
                .attr('src') + '" style="width:100%;height: 100%;display: block;margin: 0 auto;"/></div>'
        });
    }
</script>